package com.canyou.archives.service;

import com.canyou.archives.model.Category;
import com.baomidou.mybatisplus.extension.service.IService;
import com.canyou.archives.model.dto.CategoryDTO;
import com.canyou.archives.model.dto.CategoryPageDTO;
import com.canyou.archives.model.vo.PageVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 设备分类 服务类
 * </p>
 *
 * @author canyou
 * @since 2021-12-07
 */
public interface CategoryService extends IService<Category> {
    //新增编辑设备分类
    Category saveOrUpdateCategory(@Valid @NotNull(message = "设备分类信息不能为空") CategoryDTO categoryDTO);
    //条件分页查询分页
    PageVO getPageList(int current, int pageSize, CategoryPageDTO categoryPageDTO);
    //查询所有数据
    PageVO getCategoryAll();
    //设备分类Excel导出
    Boolean exportExcel(HttpServletResponse response);
    //设备分类Excel导入
    Boolean importExcel(@NotNull(message = "用户excel文件不能为空") MultipartFile file)throws Exception;
}
